﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WS.BLL
{
    public class SanphamBLL:WS.DAL.SanphamDAL
    {
        public string Layma()
        {
            var tb = base.Layma();
            var m = "0";

            if (tb != null && tb.Rows.Count > 0)
                m = tb.Rows[0]["Ma"].ToString().Substring(2) + "";

            var x = Convert.ToInt32(m);
            x++;

            m = x.ToString("000#");
            return "SP" + m;
        }
    }
}
